<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<title>{$school['title']}</title>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width initial-scale=1.0 maximum-scale=1.0 user-scalable=yes" />
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/mModifying.css?v=5.12" />
<link type="text/css" rel="stylesheet" href="{OSSURL}public/mobile/css/greenStyle.css?v=5.10120" />
<script type="text/javascript" src="{MODULE_URL}public/mobile/js/jquery-1.11.3.min.js?v=4.9"></script>
{php include $this->template('port');}
</head>
<style>
#birthday{border:0px solid #c6c6c6;position:relative;display:block;margin-top:3px;margin-left:5px;height:30px;line-height:30px;opacity:1;}
</style>
<body>
<div class="all">	
	<div id="BlackBg" class="BlackBg"></div>
	<div id="titlebar" class="header mainColor">
		<div class="l"><a class="backOff" style="background:url({OSSURL}public/mobile/img/ic_arrow_left_48px_white.svg) no-repeat;background-size: 55% 55%;background-position: 50%;" href="javascript:history.go(-1);"></a></div>
		<div class="m">
			<span style="font-size: 18px" id="headerTitleName">学生信息审核</span>
		</div>
	</div>
<div id="titlebar_bg" class="_header"></div>

		<div class="submitInfo">
			<div class="infoBox divSpacing">
				<div class="infoDiv" >
				  <span class="l">状态：</span>
				  <span class="c nameLabel">
					<label>{if $item['status'] == 1}待审核{else if $item['status'] == 2}已通过{else if $item['status'] == 3}已拒绝{/if}</label>
					{if !empty($class['cost'])}
					<label>{if $order['status'] == 1}未付费{else if $order['status'] == 2}已付费{else if $order['status'] == 3}已退费{/if}</label>
					{/if}
				  </span>
				  {if $item['status'] == 1 || $item['status'] == 3}
				  <span onclick="bound();" class="r mainfont">通过</span>
				  <span onclick="jujue();" class="t mainfont">拒绝</span>
				  {/if}
				</div>
				<div class="divHr"></div>
				<div class="infoDiv" >
				  <span class="l">姓名：</span>
				  <span class="c">
					<input id="s_name" type="text" value="{$item['name']}"/>
				  </span>
				</div>
				<div class="divHr"></div>
				<div class="infoDiv" >
				  <span class="l">学号：</span>
				  <span class="c">
					<input id="numberid" type="text" value="{$item['numberid']}"/>
				  </span>
				</div>				
				<div class="divHr"></div>
				<div class="infoDiv" >
				  <span class="l">预留手机：</span>
				  <span class="c">
					<input id="mobile" type="text" value="{$item['mobile']}" maxlength="18"/>
				  </span>
				  <span onclick="call({$item['mobile']});" class="r mainfont">呼叫</span>
				</div>				
				<div class="divHr"></div>
				<div class="infoDiv" >
				  <span class="l">年级：</span>
				  <span class="c nameLabel">
					<label id="xq_id">{$xueqi['sname']}</label>
				  </span>
				</div>
				<div class="divHr"></div>
				<div class="infoDiv">
				  <span class="l">班级：</span>
				  <span class="c">
					<select id="bj_id" value="">
					{loop $bjlist $row}
						<option value="{$row['sid']}" {if $class['sid'] == $row['sid']} selected="selected"{/if}>{$row['sname']}</option>
					{/loop}
					</select>				
				  </span>
				</div>			
				<div class="divHr"></div>
				<div class="infoDiv">
				  <span class="l">性别：</span>
				  <span class="c">
					<select id="sex" value="">
						<option value="1"{if $item['sex'] == 1} selected="selected"{/if}>男</option>
						<option value="2"{if $item['sex'] == 2} selected="selected"{/if}>女</option>
					</select>
				  </span>
				</div>
				<div class="divHr"></div>
				<div class="infoDiv">
				  <span class="l">生日：</span>
				  <span class="c">
					<input type="date" id="birthday" value="{php echo date('Y-m-d', $item['birthday'])}"/>
				  </span>
				</div>
				<div class="divHr"></div>
				<div class="infoDiv">
				  <span class="l">身份证号：</span>
				  <span class="c">
					<input id="idcard" type="text" onblur="jsCheck(this,'idnumber')" minlength="15" maxlength="18" value="{$item['idcard']}"/>
				  </span>
				</div>
				<div class="divHr"></div>
				<div class="infoDiv">
				  <span class="l">报名者：</span>
				  <span class="c">
					<select id="pard" value="">
						<option value="2"{if $item['pard'] == 2} selected="selected"{/if}>母亲</option>
						<option value="3"{if $item['pard'] == 3} selected="selected"{/if}>父亲</option>
						<option value="4"{if $item['pard'] == 4} selected="selected"{/if}>本人</option>
					</select>
				  </span>
				</div>				
				<div class="divHr"></div>
				 {if $item['status'] == 1 || $item['status'] == 3}
				<div class="submitBtn">
					<button class="mainColor" onclick="submitStuInfo();">保存修改</button>
				</div>
				 {/if}
			</div>
	</div>
</body>
<script type="text/javascript">
function submitStuInfo() {
	jConfirm("确认修改学生信息？", "删除确定对话框", function (isConfirm) {
		if(isConfirm){
			var submitData = {
				id : "{$item['id']}",
				schoolid :"{$schoolid}",
				openid :"{$openid}",
				weid :"{$weid}",
				sex : $("#sex").val(),
				numberid : $("#numberid").val(),
				s_name : $("#s_name").val(),
				idcard : $("#idcard").val(),
				njid : "{$item['nj_id']}",
				bjid : $("#bj_id").val(),
				mobile : $("#mobile").val(),
				birthday : $("#birthday").val(),
				pard : $("#pard").val(),
			};
			$.post("{php echo $this->createMobileUrl('indexajax',array('op'=>'xgxsinfo'))}",submitData,function(data){
				if(data.result){
					jTips(data.msg);
					location.reload();
				}else{
					jTips(data.msg);
				}
			},'json'); 
		}
	});
}
function bound(){
	jConfirm("确认通过学生报名申请？", "删除确定对话框", function (isConfirm) {
		if(isConfirm){
			var submitData = {
				id : "{$item['id']}",
				openid :"{$openid}",
			};
			$.post("{php echo $this->createMobileUrl('indexajax',array('op'=>'tgsq'))}",submitData,function(data){
				if(data.result){
					jTips(data.msg);
					location.reload();
				}else{
					jTips(data.msg);
				}
			},'json'); 
		}
	});
}
function jujue(){
	jConfirm("确认拒绝该申请？", "删除确定对话框", function (isConfirm) {
		if(isConfirm){
			var submitData = {
				id : "{$item['id']}",
				openid :"{$openid}",
			};
			$.post("{php echo $this->createMobileUrl('indexajax',array('op'=>'jjsq'))}",submitData,function(data){
				if(data.result){
					jTips(data.msg);
					location.reload();
				}else{
					jTips(data.msg);
				}
			},'json'); 
		}
	});	
}
function call(mobile){
window.location.href = "tel:"+mobile;
}
</script>
{php include $this->template('newfooter');}
</html>